{{#conditional-loading-spinner condition=loading}}
  {{#if topics}}
    <table class="topic-list">
      <tbody>
      {{#each t in topics}}
        <tr {{bind-attr class="t.archived"}}>
          <td>
            <div class='main-link clearfix'>
              {{topic-status topic=t}}
              {{topic-link t}}
              {{topic-post-badges unread=t.unread
                                  newPosts=t.new_posts
                                  unseen=t.unseen
                                  url=t.lastUnreadUrl}}

              {{#if t.hasExcerpt}}
                <div class="topic-excerpt">
                  {{{t.excerpt}}}
                  {{#if t.excerptTruncated}}
                    {{#unless t.canClearPin}}<a href="{{unbound t.url}}">{{i18n 'read_more'}}</a>{{/unless}}
                  {{/if}}
                  {{#if t.canClearPin}}
                    <a href="#" {{action "clearPin" t}} title="{{i18n 'topic.clear_pin.help'}}">{{i18n 'topic.clear_pin.title'}}</a>
                  {{/if}}
                </div>
              {{/if}}
            </div>
            <div class="topic-item-stats clearfix">
              <div class="pull-right">
                {{raw "list/posts-count-column" topic=t tagName="div"}}
                {{raw "list/activity-column" topic=t tagName="div" class="num activity last"}}
              </div>
              {{#unless controller.hideCategory}}
                <div class='category'>
                  {{category-link t.category}}
                </div>
              {{/unless}}
              {{#if controller.showParticipants}}
                <div class='participants'>
                  {{#each p in participants}}
                    <a href="{{unbound p.user.path}}" class="{{unbound p.extras}}">{{avatar p usernamePath="user.username" imageSize="small"}}</a>
                  {{/each}}
                </div>
              {{/if}}
              <div class="clearfix"></div>
            </div>
          </td>
        </tr>
      {{/each}}
      </tbody>
    </table>
  {{else}}
    <div class='alert alert-info'>
      {{i18n 'choose_topic.none_found'}}
    </div>
  {{/if}}
{{/conditional-loading-spinner}}
